<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>增加分离</title>
</head>
<body>

{extend name="extends/usercenter" /}

{block name="left"}
<h2>分类管理</h2>

<li>
    <a href="{:url('index',['cate_id'=>input('cate_id')])}">
        分组列表
    </a>

</li>
<li>
    <a href="{:url('add',['cate_id'=>input('cate_id')])}">
        增加分组
    </a>
</li>

{/block}

{block name="content"}


<div>
    <a href="{:url('index',['cate_id'=>$apiInfo->cate_id])}">
        返回列表
    </a>



    <form class="form-horizontal" action="" method="post">


        <br>
        <div class="form-group">
            <label  class="col-sm-2 control-label">
                接口名字
            </label>
            <div class="col-sm-10">
                <input type="text"  name="name" value="{$apiInfo->name}"
                       class="form-control"  placeholder="名字">

        </div>

        <div class="form-group">
            <label  class="col-sm-2 control-label">
                接口地址
            </label>
            <div class="col-sm-10">
                <input type="text"  name="url" value="{$apiInfo->url}"
                       class="form-control"  placeholder="地址">
            </div>
        </div>

            <div class="form-group">
                <label  class="col-sm-2 control-label">
                    接口发送类型
                </label>
                <div class="col-sm-10">

                    <select class="form-control"
                            name="to_type" >
                        <option value="get">get</option>
                        <option value="post">post</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label  class="col-sm-2 control-label">
                    默认发送数据
                </label>
                <div class="col-sm-10">
                    <textarea class="form-control" name="data" rows="5">{$apiInfo->data}</textarea>
                </div>
            </div>





            <div class="form-group">
                <label  class="col-sm-2 control-label">
                    接口发送类型
                </label>
                <div class="col-sm-10">

                    <select class="form-control"
                            name="re_type" >
                        <option value="json">JSON</option>
                        <option value="jsonp">jsonp</option>
                        <option value="text">text</option>
                        <option value="xml">XML</option>
                        <option value="html">HTML</option>
                        <option value="script">script</option>
                    </select>
                </div>
            </div>


            <input type="hidden" name="id" value="{$apiInfo->id}">

            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    <button type="submit" class="btn btn-default">提交</button>
                </div>
            </div>
            <script>
                $().ready(function () {
                        $('[name="re_type"]').val('{$apiInfo->re_type}');
                    $('[name="to_type"]').val('{$apiInfo->to_type}');

                })

            </script>

    </form>
</div>
<script>

</script>

{/block}


</body>
</html>